<template>
  <form-item :form-datas = "formDatas" :form-item = "field" :parent-comp-type = "parentCompType"
  >
    <el-transfer
        :button-texts = "field.preps['buttonTexts']"
        :data = "field.preps['data']"
        :filter-method = "field.preps['filterMethod']"
        :filter-placeholder = "field.preps['filterPlaceholder']"
        :filterable = "field.preps['filterable']"
        :format = "field.preps['format']"
        :left-default-checked = "field.preps['leftDefaultChecked']"
        :props = "field.preps['props']"
        :render-content = "field.preps['renderContent']"
        :right-default-checked = "field.preps['rightDefaultChecked']"
        :target-order = "field.preps['targetOrder']"
        :titles = "field.preps['titles']"
        v-model = "starHorseDynamicForm[field.preps['name']]"
    />

  </form-item>
</template>

<script>
import FormItem from "./form-item";

export default {
  name: "transfer-item",
  components: {FormItem},
  props: {
    parentCompType: {type: Object},
    starHorseDynamicForm: {type: Object},
    field: {
      type: Object
    },
    formDatas: {type: Object}
  },
  data() {
    let formItem = {label: "input", required: false};
    return {
      formItem,
      dataField: ""
    }
  },
  methods: {
    selectItem(data) {
      let _this = this;
      _this.$emit("selectItem", data, _this.parentCompType);
    }
  }
}
</script>

<style scoped>

</style>